package com.maxjay.common.exception.support;

import com.maxjay.common.exception.ErrorLevel;

/**
 * 异常工具类
 * @author zmw
 *
 */
public class GeneExceptionUtil {
	/**
	 * 错误级别转成用户可视友好信息
	 * @param level
	 * @return
	 */
	public static String level2Name(int level) {
		switch (level) {
		case ErrorLevel.NONE:
		case ErrorLevel.DEBUG:
		case ErrorLevel.INFO:
			return "提示";
		case ErrorLevel.WARN:
			return "警告";
		case ErrorLevel.ERROR:
			return "错误";
		case ErrorLevel.FATAL:
			return "系统错误";
		default:
			return "提示";
		}
	}
}
